<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Reranker Framework (ReFr): reranker::FeatureExtractor Class Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />

<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">Reranker Framework (ReFr)
   
   </div>
   <div id="projectbrief">Reranking framework for structure prediction and discriminative language modeling</div>
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.6.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark">&#160;</span>Defines</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="namespacereranker.html">reranker</a>      </li>
      <li class="navelem"><a class="el" href="classreranker_1_1_feature_extractor.html">FeatureExtractor</a>      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a>  </div>
  <div class="headertitle">
<div class="title">reranker::FeatureExtractor Class Reference</div>  </div>
</div><!--header-->
<div class="contents">
<!-- doxytag: class="reranker::FeatureExtractor" --><!-- doxytag: inherits="reranker::FactoryConstructible" -->
<p>An abstract base class/interface for all feature extractors.  
 <a href="classreranker_1_1_feature_extractor.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="feature-extractor_8_h_source.html">feature-extractor.H</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for reranker::FeatureExtractor:</div>
<div class="dyncontent">
 <div class="center">
  <img src="classreranker_1_1_feature_extractor.png" usemap="#reranker::FeatureExtractor_map" alt=""/>
  <map id="reranker::FeatureExtractor_map" name="reranker::FeatureExtractor_map">
<area href="classreranker_1_1_factory_constructible.html" title="An interface to make it easier to implement Factory-constructible types by implementing both required..." alt="reranker::FactoryConstructible" shape="rect" coords="564,0,836,24"/>
<area href="classreranker_1_1_abstract_file_backed_feature_extractor.html" title="This class makes it easy for concrete subclasses to extract features based on input from a file..." alt="reranker::AbstractFileBackedFeatureExtractor" shape="rect" coords="141,112,413,136"/>
<area href="classreranker_1_1_example_feature_extractor.html" title="This class illustrates how to write a FeatureExtractor implementation." alt="reranker::ExampleFeatureExtractor" shape="rect" coords="423,112,695,136"/>
<area href="classreranker_1_1_ngram_feature_extractor.html" title="Extracts n-gram features for candidate hypotheses on the fly." alt="reranker::NgramFeatureExtractor" shape="rect" coords="705,112,977,136"/>
<area href="classreranker_1_1_rank_feature_extractor.html" title="Encodes the baseline rank as a boolean feature." alt="reranker::RankFeatureExtractor" shape="rect" coords="987,112,1259,136"/>
<area href="classreranker_1_1_basic_file_backed_feature_extractor.html" title="A class to read one line at a time from a backing file, and tokenize that line based on whitespace..." alt="reranker::BasicFileBackedFeatureExtractor" shape="rect" coords="0,168,272,192"/>
<area href="classreranker_1_1_file_backed_loss_setter.html" title="A &ldquo;feature extractor&rdquo; that reads lines from a backing file, setting each candidate&rsquo;s loss via its Can..." alt="reranker::FileBackedLossSetter" shape="rect" coords="282,168,554,192"/>
<area href="classreranker_1_1_file_backed_ngram_feature_extractor.html" title="A class to read one line at a time from backing file, and tokenize that line based on whitespace..." alt="reranker::FileBackedNgramFeatureExtractor" shape="rect" coords="0,224,272,248"/>
</map>
 </div></div>

<p><a href="classreranker_1_1_feature_extractor-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classreranker_1_1_feature_extractor.html#a45a7d1ef3fbc27fcac06e2167bde1907">FeatureExtractor</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructs an empty feature vector.  <a href="#a45a7d1ef3fbc27fcac06e2167bde1907"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classreranker_1_1_feature_extractor.html#a92ea3deaf805a3db9b78a837e2aa2aff">~FeatureExtractor</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroys this vector.  <a href="#a92ea3deaf805a3db9b78a837e2aa2aff"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classreranker_1_1_feature_extractor.html#a2ec99fbd293b35e90f9553a729e6f649">Init</a> (const string &amp;arg)=0</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes this feature extractor.  <a href="#a2ec99fbd293b35e90f9553a729e6f649"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classreranker_1_1_feature_extractor.html#af1c46248eb454384594dc3fcb61b0e70">Extract</a> (<a class="el" href="classreranker_1_1_candidate.html">Candidate</a> &amp;candidate, <a class="el" href="classreranker_1_1_feature_vector.html">FeatureVector</a>&lt; int, double &gt; &amp;features)=0</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Extracts features for the specified candidate, where each feature is represented by an int for its unique identifier.  <a href="#af1c46248eb454384594dc3fcb61b0e70"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classreranker_1_1_feature_extractor.html#aa35034d5100e4a2cbe83325cad6c4a6b">ExtractSymbolic</a> (<a class="el" href="classreranker_1_1_candidate.html">Candidate</a> &amp;candidate, <a class="el" href="classreranker_1_1_feature_vector.html">FeatureVector</a>&lt; string, double &gt; &amp;symbolic_features)=0</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Extracts symbolic features for the specified candidate, where each feature is represented by a string for its unique identifier.  <a href="#aa35034d5100e4a2cbe83325cad6c4a6b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classreranker_1_1_feature_extractor.html#aff5c63502be6a9e662d0db49a174a5f7">Reset</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Indicates to this instance that iteration over candidate sets on which features are being extracted has been reset.  <a href="#aff5c63502be6a9e662d0db49a174a5f7"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classreranker_1_1_feature_extractor.html#ae7e30e3985d450909d7e70fc2c9658f2">Extract</a> (<a class="el" href="classreranker_1_1_candidate_set.html">CandidateSet</a> &amp;candidate_set)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Extracts features for all the candidates in the specified <a class="el" href="classreranker_1_1_candidate_set.html" title="A class to hold a set of candidates, either for training or test.">CandidateSet</a>.  <a href="#ae7e30e3985d450909d7e70fc2c9658f2"></a><br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>An abstract base class/interface for all feature extractors. </p>
<p>Concrete subclasses need to register themselves with the <a class="el" href="classreranker_1_1_feature_extractor.html">FeatureExtractor</a> <a class="el" href="classreranker_1_1_factory.html">Factory</a> via the <a class="el" href="feature-extractor_8_h.html#a7271aa7d6a37191a08c076a838c7ca36">REGISTER_FEATURE_EXTRACTOR(MyDerivedClassName)</a> macro.</p>
<p>Example: </p>
<div class="fragment"><pre class="fragment"> my-feature-extractor.H:

 <span class="keyword">class </span>MyFeatureExtractor : <span class="keyword">public</span> <a class="code" href="classreranker_1_1_feature_extractor.html#a45a7d1ef3fbc27fcac06e2167bde1907" title="Constructs an empty feature vector.">FeatureExtractor</a> {
  <span class="keyword">public</span>:
   ...
 };

 my-feature-extractor.C:

 <a class="code" href="feature-extractor_8_h.html#a7271aa7d6a37191a08c076a838c7ca36" title="Registers the FeatureExtractor  with the specified subtype TYPE with the FeatureExtractor  Factory...">REGISTER_FEATURE_EXTRACTOR</a>(MyFeatureExtractor)
</pre></div><dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classreranker_1_1_example_feature_extractor.html" title="This class illustrates how to write a FeatureExtractor implementation.">ExampleFeatureExtractor</a> for a fully functional, if not quite useful, example <a class="el" href="classreranker_1_1_feature_extractor.html" title="An abstract base class/interface for all feature extractors.">FeatureExtractor</a> implementation </dd>
<dd>
<a class="el" href="feature-extractor-test_8_c.html" title="Test driver for the reranker::FeatureExtractor and reranker::FeatureExtractorFactory classes...">feature-extractor-test.C</a> for a working example employing a <a class="el" href="classreranker_1_1_feature_extractor.html" title="An abstract base class/interface for all feature extractors.">FeatureExtractor</a> </dd>
<dd>
<a class="el" href="classreranker_1_1_executive_feature_extractor.html" title="This class is like a regular FeatureExtractor, but has been promoted to the executive level and thus ...">ExecutiveFeatureExtractor</a> for a class that can &ldquo;execute&rdquo; a suite of <a class="el" href="classreranker_1_1_feature_extractor.html">FeatureExtractor</a> instances on a <a class="el" href="classreranker_1_1_candidate_set.html">CandidateSet</a> </dd></dl>

<p>Definition at line <a class="el" href="feature-extractor_8_h_source.html#l00086">86</a> of file <a class="el" href="feature-extractor_8_h_source.html">feature-extractor.H</a>.</p>
</div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a45a7d1ef3fbc27fcac06e2167bde1907"></a><!-- doxytag: member="reranker::FeatureExtractor::FeatureExtractor" ref="a45a7d1ef3fbc27fcac06e2167bde1907" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classreranker_1_1_feature_extractor.html#a45a7d1ef3fbc27fcac06e2167bde1907">reranker::FeatureExtractor::FeatureExtractor</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Constructs an empty feature vector. </p>

<p>Definition at line <a class="el" href="feature-extractor_8_h_source.html#l00089">89</a> of file <a class="el" href="feature-extractor_8_h_source.html">feature-extractor.H</a>.</p>

</div>
</div>
<a class="anchor" id="a92ea3deaf805a3db9b78a837e2aa2aff"></a><!-- doxytag: member="reranker::FeatureExtractor::~FeatureExtractor" ref="a92ea3deaf805a3db9b78a837e2aa2aff" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classreranker_1_1_feature_extractor.html#a92ea3deaf805a3db9b78a837e2aa2aff">reranker::FeatureExtractor::~FeatureExtractor</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Destroys this vector. </p>

<p>Definition at line <a class="el" href="feature-extractor_8_h_source.html#l00091">91</a> of file <a class="el" href="feature-extractor_8_h_source.html">feature-extractor.H</a>.</p>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="af1c46248eb454384594dc3fcb61b0e70"></a><!-- doxytag: member="reranker::FeatureExtractor::Extract" ref="af1c46248eb454384594dc3fcb61b0e70" args="(Candidate &amp;candidate, FeatureVector&lt; int, double &gt; &amp;features)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void <a class="el" href="classreranker_1_1_feature_extractor.html#af1c46248eb454384594dc3fcb61b0e70">reranker::FeatureExtractor::Extract</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classreranker_1_1_candidate.html">Candidate</a> &amp;&#160;</td>
          <td class="paramname"><em>candidate</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classreranker_1_1_feature_vector.html">FeatureVector</a>&lt; int, double &gt; &amp;&#160;</td>
          <td class="paramname"><em>features</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Extracts features for the specified candidate, where each feature is represented by an int for its unique identifier. </p>
<dl class="user"><dt><b>Implementation advice:</b></dt><dd>Please play nice with others! For efficiency, the feature vector you are modifying is the actual feature vector inside the specified <a class="el" href="classreranker_1_1_candidate.html" title="A class to represent a candidate in a set of candidates that constitutes a training instance for a re...">Candidate</a>. Please use <a class="el" href="classreranker_1_1_feature_vector.html#a541f26184a4407f62eb5dad8102cf375" title="Increments the weight of the specified feature by the specified amount.">FeatureVector::IncrementWeight</a> wherever possible; only use <a class="el" href="classreranker_1_1_feature_vector.html#ad94d388ef81023981d6924a2020268d2" title="Sets the weight of the specified feature to the specified value.">FeatureVector::SetWeight</a> if you truly want to blow away any existing weight for a feature.</dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">candidate</td><td>the candidate for which to extract features </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">features</td><td>the features extracted for the specified candidate </td></tr>
  </table>
  </dd>
</dl>

<p>Implemented in <a class="el" href="classreranker_1_1_ngram_feature_extractor.html#aeee5adf6726cb98adb1151b566d01b79">reranker::NgramFeatureExtractor</a>, <a class="el" href="classreranker_1_1_abstract_file_backed_feature_extractor.html#a6c6d31af782109224da56bee01316523">reranker::AbstractFileBackedFeatureExtractor</a>, <a class="el" href="classreranker_1_1_example_feature_extractor.html#a8b12be611b02ee796b2bafb3e594cdd6">reranker::ExampleFeatureExtractor</a>, <a class="el" href="classreranker_1_1_file_backed_ngram_feature_extractor.html#a2376e8f3a73cdac208c82189835c7c8d">reranker::FileBackedNgramFeatureExtractor</a>, <a class="el" href="classreranker_1_1_file_backed_loss_setter.html#a1582a78931b69d33af342a1c075af4bd">reranker::FileBackedLossSetter</a>, <a class="el" href="classreranker_1_1_rank_feature_extractor.html#a24cf11b7c18c69b916f561a6c932d2c1">reranker::RankFeatureExtractor</a>, and <a class="el" href="classreranker_1_1_basic_file_backed_feature_extractor.html#a5a42152a8957f32caef319d532f9de76">reranker::BasicFileBackedFeatureExtractor</a>.</p>

</div>
</div>
<a class="anchor" id="ae7e30e3985d450909d7e70fc2c9658f2"></a><!-- doxytag: member="reranker::FeatureExtractor::Extract" ref="ae7e30e3985d450909d7e70fc2c9658f2" args="(CandidateSet &amp;candidate_set)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void <a class="el" href="classreranker_1_1_feature_extractor.html#af1c46248eb454384594dc3fcb61b0e70">reranker::FeatureExtractor::Extract</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classreranker_1_1_candidate_set.html">CandidateSet</a> &amp;&#160;</td>
          <td class="paramname"><em>candidate_set</em></td><td>)</td>
          <td><code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Extracts features for all the candidates in the specified <a class="el" href="classreranker_1_1_candidate_set.html" title="A class to hold a set of candidates, either for training or test.">CandidateSet</a>. </p>
<p>The default implementation here uses the concrete implementations of the <a class="el" href="classreranker_1_1_feature_extractor.html#af1c46248eb454384594dc3fcb61b0e70">Extract(Candidate&amp;,FeatureVector&lt;int,double&gt;&amp;)</a> and <a class="el" href="classreranker_1_1_feature_extractor.html#aa35034d5100e4a2cbe83325cad6c4a6b">ExtractSymbolic</a> methods.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">candidate_set</td><td>the set of candidates for which to extract features. </td></tr>
  </table>
  </dd>
</dl>

<p>Reimplemented in <a class="el" href="classreranker_1_1_abstract_file_backed_feature_extractor.html#af0993c4d905f72381d188dd6322d4a3d">reranker::AbstractFileBackedFeatureExtractor</a>, and <a class="el" href="classreranker_1_1_rank_feature_extractor.html#a2337c97c74c0c0f4dbbd733580337a8c">reranker::RankFeatureExtractor</a>.</p>

<p>Definition at line <a class="el" href="feature-extractor_8_h_source.html#l00145">145</a> of file <a class="el" href="feature-extractor_8_h_source.html">feature-extractor.H</a>.</p>

</div>
</div>
<a class="anchor" id="aa35034d5100e4a2cbe83325cad6c4a6b"></a><!-- doxytag: member="reranker::FeatureExtractor::ExtractSymbolic" ref="aa35034d5100e4a2cbe83325cad6c4a6b" args="(Candidate &amp;candidate, FeatureVector&lt; string, double &gt; &amp;symbolic_features)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void <a class="el" href="classreranker_1_1_feature_extractor.html#aa35034d5100e4a2cbe83325cad6c4a6b">reranker::FeatureExtractor::ExtractSymbolic</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classreranker_1_1_candidate.html">Candidate</a> &amp;&#160;</td>
          <td class="paramname"><em>candidate</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classreranker_1_1_feature_vector.html">FeatureVector</a>&lt; string, double &gt; &amp;&#160;</td>
          <td class="paramname"><em>symbolic_features</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Extracts symbolic features for the specified candidate, where each feature is represented by a string for its unique identifier. </p>
<dl class="user"><dt><b>Implementation advice:</b></dt><dd>Please play nice with others! For efficiency, the feature vector you are modifying is the actual feature vector inside the specified <a class="el" href="classreranker_1_1_candidate.html" title="A class to represent a candidate in a set of candidates that constitutes a training instance for a re...">Candidate</a>. Please use <a class="el" href="classreranker_1_1_feature_vector.html#a541f26184a4407f62eb5dad8102cf375" title="Increments the weight of the specified feature by the specified amount.">FeatureVector::IncrementWeight</a> wherever possible; only use <a class="el" href="classreranker_1_1_feature_vector.html#ad94d388ef81023981d6924a2020268d2" title="Sets the weight of the specified feature to the specified value.">FeatureVector::SetWeight</a> if you truly want to blow away any existing weight for a feature.</dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">candidate</td><td>the candidate for which to extract features </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">symbolic_features</td><td>the features extracted for the specified candidate </td></tr>
  </table>
  </dd>
</dl>

<p>Implemented in <a class="el" href="classreranker_1_1_ngram_feature_extractor.html#a2990e7fc936e8c697414949d5e0eb17f">reranker::NgramFeatureExtractor</a>, <a class="el" href="classreranker_1_1_example_feature_extractor.html#ac45ecd80f2929c8dbbb705e36a407718">reranker::ExampleFeatureExtractor</a>, <a class="el" href="classreranker_1_1_file_backed_ngram_feature_extractor.html#a5d00f653c80bb8f502f7228a6c27c5d2">reranker::FileBackedNgramFeatureExtractor</a>, <a class="el" href="classreranker_1_1_abstract_file_backed_feature_extractor.html#afdbfa39e53be2006eebea77d5d1cc640">reranker::AbstractFileBackedFeatureExtractor</a>, <a class="el" href="classreranker_1_1_file_backed_loss_setter.html#ac5074ad24b993ea7c3735ddcf4627c03">reranker::FileBackedLossSetter</a>, <a class="el" href="classreranker_1_1_rank_feature_extractor.html#a463f859a276742150edfa5c8ffb7400f">reranker::RankFeatureExtractor</a>, and <a class="el" href="classreranker_1_1_basic_file_backed_feature_extractor.html#ad43d543b51470fbc0e6bbdbd16791c30">reranker::BasicFileBackedFeatureExtractor</a>.</p>

</div>
</div>
<a class="anchor" id="a2ec99fbd293b35e90f9553a729e6f649"></a><!-- doxytag: member="reranker::FeatureExtractor::Init" ref="a2ec99fbd293b35e90f9553a729e6f649" args="(const string &amp;arg)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void <a class="el" href="classreranker_1_1_feature_extractor.html#a2ec99fbd293b35e90f9553a729e6f649">reranker::FeatureExtractor::Init</a> </td>
          <td>(</td>
          <td class="paramtype">const string &amp;&#160;</td>
          <td class="paramname"><em>arg</em></td><td>)</td>
          <td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Initializes this feature extractor. </p>
<p>This method is guaranteed to be invoked by a <a class="el" href="classreranker_1_1_factory.html">Factory</a> after construction.</p>
<dl class="see"><dt><b>See also:</b></dt><dd>Factory::Create(const string&amp;,string&amp;,string&amp;,bool&amp;,bool&amp;) </dd></dl>

<p>Reimplemented from <a class="el" href="classreranker_1_1_factory_constructible.html#a0da3c3a5ce59818137e59a9364162101">reranker::FactoryConstructible</a>.</p>

<p>Implemented in <a class="el" href="classreranker_1_1_ngram_feature_extractor.html#a06c5cf086e02b2b84a8cbe218599778c">reranker::NgramFeatureExtractor</a>, <a class="el" href="classreranker_1_1_abstract_file_backed_feature_extractor.html#a8f10510be662115b0452f860285c0cde">reranker::AbstractFileBackedFeatureExtractor</a>, <a class="el" href="classreranker_1_1_file_backed_loss_setter.html#a01f504b9a7d64b4f7b537d29d3bc989c">reranker::FileBackedLossSetter</a>, <a class="el" href="classreranker_1_1_example_feature_extractor.html#a87896ca90018afad336202eb61df37a2">reranker::ExampleFeatureExtractor</a>, and <a class="el" href="classreranker_1_1_rank_feature_extractor.html#a7b3bbefff678ef95e7234feee224e57f">reranker::RankFeatureExtractor</a>.</p>

</div>
</div>
<a class="anchor" id="aff5c63502be6a9e662d0db49a174a5f7"></a><!-- doxytag: member="reranker::FeatureExtractor::Reset" ref="aff5c63502be6a9e662d0db49a174a5f7" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void <a class="el" href="classreranker_1_1_feature_extractor.html#aff5c63502be6a9e662d0db49a174a5f7">reranker::FeatureExtractor::Reset</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Indicates to this instance that iteration over candidate sets on which features are being extracted has been reset. </p>
<p>Concrete subclasses should override this method (which by default does nothing) if they need to do something special at the beginning of each iteration. </p>

<p>Reimplemented in <a class="el" href="classreranker_1_1_abstract_file_backed_feature_extractor.html#aa156423a870877982dd9ceea36e0be54">reranker::AbstractFileBackedFeatureExtractor</a>.</p>

<p>Definition at line <a class="el" href="feature-extractor_8_h_source.html#l00134">134</a> of file <a class="el" href="feature-extractor_8_h_source.html">feature-extractor.H</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="feature-extractor_8_h_source.html">feature-extractor.H</a></li>
</ul>
</div><!-- contents -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark">&#160;</span>Defines</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>



<hr class="footer"/><address class="footer"><small>
Generated on Tue Apr 9 2013 11:56:30 for Reranker Framework (ReFr) by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.6.1
</small></address>

</body>
</html>
